package cm.entity;


import cm.NewsDao.NewsDao1;
import cm.NewsDaoImpl.NewsDaoImpl1;
import cm.NewsDaoImpl.NewsDaoImpl2;
import cm.entity.News1;
import cm.entity.News2;

import java.util.List;

public class Text1 {
    public static void main(String[] args) {
        /*NewsDaoImpl1 newsDao=new NewsDaoImpl1();
        List<News1> newsList=newsDao.getNewsList();
        for(News1 news:newsList){
            System.out.println(news.getId()+"\t"+news.getTitle()+"\t");
        }*/


        NewsDaoImpl2 newsDao=new NewsDaoImpl2();
        List<News2> newsList=newsDao.getNewsList();
        for(News2 news:newsList){
            System.out.println(news.getId()+"\t"+news.getName()+"\t"+news.getCreateDate());
        }


       /* NewsDaoImpl3 newsDao=new NewsDaoImpl3();
        List<News3> newsList=newsDao.getNewsList();
        for(News3 news:newsList){
            System.out.println(news.getId()+"\t"+news.getNewsId() + "\t" +"\t"+news.getContent()+"\t"+news.getAuthor()+"\t"+news.getIp() +"\t" +news.getCreateDate());
        }
*/


       /* NewsDaoImpl4 newsDao=new NewsDaoImpl4();
        List<News4> newsList=newsDao.getNewsList();
        for(News4 news:newsList){
            System.out.println(news.getId()+"\t"+news.getUserName()+"\t"+news.getPassword()+"\t"+news.getEmail()+"\t"+news.getUserType()+"\t");
        }*/


        /*NewsDaoImpl1 newsDao1 = new NewsDaoImpl1();
        News1 news = new News1();
        news.setCategoryId(2);
        news.setTitle("无卡");

        newsDao1.add(news);*/

    }
}
